<template lang="pug">
  keep-alive
    kalix-table(bizKey="maintainResult" v-bind:title="title" v-bind:targetURL="targetURL"
      v-bind:bizDialog="bizDialog" v-bind:bizSearch="'MaintainResultSearch'"
      v-bind:searchTitle="searchTitle" v-bind:btnList="btnList"
      v-bind:toolbarBtnList="toolbarBtnList" v-bind:isFixedColumn="isFixedColumn"
      v-bind:isAfterSearch="true" v-on:handleAfterSearch="handleAfterSearch"
      v-on:onTableRowClick="onTableRowClick" ref="MaintainResultTable")
      template(slot="tableColumnSlot")
        el-table-column(prop="examineeName" label="考生" align="center" )
        el-table-column(prop="examCardNumber" label="准考证号" align="center" )
        el-table-column(prop="idCards" label="身份证号" align="center" )
        el-table-column(prop="subject" label="考试科目" align="center" )
        el-table-column(prop="score" label="成绩" align="center" )
</template>

<script type="text/ecmascript-6">
  import {MaintainResultURL} from '../config.toml'
  import {MaintainResultBtnList} from './config'

  export default {
    name: 'kalix-exam-maintainresult',
    props: {
      title: {
        type: String,
        default: ''
      },
      searchTitle: {
        type: String,
        default: ''
      }
    },
    data() {
      return {
        toolbarBtnList: [
          {id: 'add', isShow: false}
        ],
        targetURL: MaintainResultURL,
        isFixedColumn: true,
        btnList: MaintainResultBtnList,
        bizDialog: [
          {id: 'view', dialog: 'MaintainResultView'}
        ]
      }
    },
    methods: {
      onTableRowClick(row, event, column) {
        this.$emit('resultRow', row)
      },
      handleAfterSearch(bizKey, tableData) {
        this.$emit('clearItem')
      }
    }
  }
</script>

<style scoped lang="stylus">
</style>
